<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>

    <style>
        /*语法：.class的名称{}
        可以多个标签归类及复用*/
       .test1{
           color: red;
       }
       .test2{
           color: green;
       }
    </style>
</head>
<body>
    <h1 class="test1"> 标题1</h1>
    <h2 class="test2"> 标题2</h2>
</body>
</html>